package com.google.code.tcx2nike;

/**
 * Converter class that 
 *   generates a NikeWorkoutData object 
 *   from a GarminWorkoutData object
 */
public class Garmin2NikeConverter {

	def garminWorkoutData
	def nikeWorkoutData
	
	Garmin2NikeConverter(garminWorkoutData){
		this.garminWorkoutData=garminWorkoutData
	}

	/**
	 * Runs the conversion.
	 */
	def NikeWorkoutData convert(){

		def g = garminWorkoutData
		nikeWorkoutData = new NikeWorkoutData(
				g.getStartTime(),
				g.getDuration(),
				g.getDistance(),
				g.getWeight()
				)
		return nikeWorkoutData
	}
}
